package 结构器模式.装饰者模式;

/**
 * @Description 鸡蛋类（配料），具体装饰者角色
 * @Author shallow
 * @Date 2023/3/5 16:41
 */

public class Egg extends Garnish{

    public Egg(FastFood fastFood){
        super(fastFood,1,"鸡蛋");
    }

    @Override
    public float cost() {
        return getPrice()+getFastFood().cost();
    }

    @Override
    public String getDesc() {
        return super.getDesc()+getFastFood().getDesc();
    }
}
